
public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		/*Car c = new Car();
		c.run();
		Ak47 ak47 = new Ak47();
		ak47.shoot();
		Apple apple = new Apple();
		apple.printName();*/
	/*	DefaultFactory defaultFactory = new DefaultFactory();
		defaultFactory.createAk47().shoot();
		defaultFactory.createCar().run();
		defaultFactory.createApple().printName();*/
		
	    AbstractFactory defaultFactory = new MagicFactory();
		defaultFactory.createWeapon().shoot();
		defaultFactory.createVehicle().run();
		defaultFactory.createFood().printName();


	}

}
